﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using NetCMS.DALFactory;
using NetCMS.Model;

namespace NetCMS.Content
{
    public class Message
    {
        private IMessage dal;
        public Message()
        {
            dal = NetCMS.DALFactory.DataAccess.CreateMessage();
        }
        #region Message_box.aspx
        public int sel_msgInfo(string ID,int flag)
        {
            return dal.sel_msgInfo(ID,flag);
        }
        public DataTable sel_userMessage(string ID,int flag)
        {
            return dal.sel_userMessage(ID,flag);
        }

        public void del_userMsg(string ID)
        {
            dal.del_userMsg(ID);
        }
        public int update_msgInfo(string ID, int flag)
        {
            return dal.update_msgInfo(ID,flag);
        }
        #endregion

        #region message_write.aspx
        public string sel_userInfo(string UserNum)
        {
            return dal.sel_userInfo(UserNum);
        }
        public void Add(NetCMS.Model.message uc)
        {
            dal.Add(uc);
        }
        public int add_userMsg(string MfID, string Mid, string UserNum, string fileName, string FileUrl, DateTime CreatTime)
        {
            return dal.add_userMsg(MfID, Mid, UserNum, fileName, FileUrl, CreatTime);
        }

        public int clearmessage()
        {
            return dal.clearmessage();
        }

        public void clearmessagerecyle()
        {
            dal.clearmessagerecyle();
        }

        #endregion

    }
}